package Project.ejb1.services;

import javax.ejb.Stateless;
import javax.persistence.Query;

import Project.ejb1.entities.Client;

@Stateless
public class ClientService extends AbstractServiceImpl<Client> implements ClientServiceLocal {

	/*
	 * Default constructor for class DrhService
	 */
	public ClientService() {
		super();		
		aClass = Client.class;
	}

	@Override
	public Client findbyRib(int rib) {
		
		Query query = entityManager.createNativeQuery(
				"select * from Client where rib = ? ",Client.class);  
		query.setParameter(1, rib);
		
		return (Client) query.getResultList();
	}

}